/**
 * Copyright 2017 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Condensed'), local('RobotoCondensed-Regular'), url(fonts/RobotoCondensed400.ttf) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Mono'), local('RobotoMono-Regular'), url(fonts/RobotoMono400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

:root {
  --code-background: hsla(220, 60%, 98%, 1);
  --code-border-color: hsla(220, 60%, 85%, 1);
  --aside-width: 400px;
  --indent-line: hsla(0, 0%, 0%, 0.1);
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  border: 0;
}
body {
  padding: 0 2em;
}
html {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  padding: 0;
}
code, pre {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9em;
}
pre {
  margin: 0;
}
p:first-child {
  margin-top: 0;
}
p:last-child {
  margin-bottom: 0;
}

ul.literate {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 0;
}
ul.literate li {
  margin: 0;
  padding: 0;

  display: flex;
  align-items: stretch;

  border: 0;
}
ul.literate li.blockcomment {
  border-top: 1px solid rgba(0, 0, 0, 0.24);
}
ul.literate li.blockcomment:first-of-type {
  border-top: none;
}
ul.literate li.empty {
  display: none;
}
ul.literate > li > aside,
ul.literate > li > code {
  padding: 1em;
}
ul.literate > li > aside {
  flex-shrink: 0;
  padding-right: 2em;
  width: var(--aside-width);
}
ul.literate > li > code {
  border-left-width: 1px;
  border-left-style: solid;
  border-left-color: var(--code-border-color);
  padding-left: 2em;
  flex-shrink: 1;
  flex-grow: 1;
  background-color: var(--code-background);
  overflow-x: auto;
  box-sizing: content-box;
}
ul.literate > li > code > * {
  width: 100%;
}
ul.literate > li:first-of-type > code,
ul.literate > li:first-of-type > aside {
  padding-top: 2em;
}
ul.literate > li:last-of-type > code,
ul.literate > li:last-of-type > aside {
  padding-bottom: 2em;
}

@media (max-width: 1000px) {
  ul.literate li {
    flex-direction: column;
  }
  ul.literate li > aside {
    margin: 1em 0 0.5em 0;
  }

  ul.literate > li:last-of-type > aside {
    padding-bottom: 0;
  }
  ul.literate aside.empty {
    display: none;
  }
  ul.literate aside.empty + code {
    padding-top: 1em;
  }
  ul.literate li.blockcomment {
    border-top: 1px solid transparent;
  }
}

.intro {
  max-width: 720px;
  padding: 20px;
}

.demo {
  width: 100%;
  border: 0;
  margin: 20px 0;
}

code {
  white-space: pre;
}
code .indent {
  border-left: 1px solid var(--indent-line);
}
code.example {
  display: block;
  background-color: var(--code-background);
  margin: 20px 0;
  padding: 20px;
}
